<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      grid-template-rows: 50px 400px 50px;
      grid-template-areas: 'h h h h h h h h h h h h'
                           'm m c c c c c c c c c c'
                           'f f f f f f f f f f f f';
    }
    .header {
      grid-area: h;
      background-color: aqua;
    }
    .menu {
      grid-area: m;
      background-color: blue;
    }
    .content {
      grid-area: c;
      background-color: #f00;
    }
    .footer {
      grid-area: f;
      background-color: #0f0;
    }
    
    /* 屏幕小于768px */
    @media (max-width:768px) {
      .container {
        grid-template-areas: 'h h h h h h h h h m m m'
                             'c c c c c c c c c c c c'
                             'f f f f f f f f f f f f';
      }
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header">头部</div>
    <div class="menu">菜单栏</div>
    <div class="content">内容</div>
    <div class="footer">底部</div>
  </div>
</body>
</html>